package com.springboot.example.monitor.web;

import com.springboot.example.monitor.domain.db.User;
import com.springboot.example.monitor.mapper.UserMapper;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;
import java.util.List;

/**
 * 作者: guo yao
 * 日期: 2016年02月23日
 * 时间: 下午16:57
 */
@Controller
@RequestMapping(value = "/users")
public class UserController {

    @Resource
    private UserMapper userMapper;

    @RequestMapping("/index.html")
    public ModelAndView index() throws Throwable {
        ModelAndView mav = new ModelAndView();
        User user = new User();
        user.setEmail("guoy@123.com");
        List<User> list = userMapper.select(user);
        mav.setViewName("index_main");
        return mav;
    }

    // 新增用户

    // 修改用户

    // 用户列表

    // 删除用户
}
